/*
 * Track.h
 *
 *  Created on: 18.10.2011
 *  Author: pavel
 */

#ifndef TRACK_H_
#define TRACK_H_
#include <vector>

#include "Point.h"
using namespace std;

class Track {
public:
	Track();
	virtual ~Track();
	void addPoint(int x, int y);
	void save(const char * fileName);
	void load(const char * fileName);
	void clear();
	unsigned size();
	double length();
	int getX(unsigned index);
	int getY(unsigned index);
	void convert(vector<unsigned> &converted, int degrees) const;

	const vector<Point>& getPoints() const;
	
	Point getCenter() const;
private:
	vector<Point> points;
};

#endif /* TRACK_H_ */
